package offer;

public class SingletonII {

    private static volatile SingletonII instance;
    private SingletonII(){}

    public static SingletonII getInstance(){
        if(instance == null) {
            synchronized (SingletonII.class) {
                if (instance == null) {
                    instance = new SingletonII();
                }
            }
        }
        return instance;
    }
}
